﻿ @model HomeDetailsViewModel
@{
    Layout = "_Layout";
    ViewBag.Title = "学生详情信息";
    var photoPath = "~/images/" + (@Model.Student.PhotoPath ?? "wala.jpg");
}

<div class="row justify-content-center m-3">
    <div class="col-sm-5">
        <div class="card">
            <div class="card-header">
                <h1>@Model.Student.Name</h1>
            </div>

            <div class="card-body text-center">
                <img class="card-img-top h-25" src="@photoPath" asp-append-version="true" />
                <h4>学生ID：@Model.Student.Id</h4>
                <h4>邮箱地址：@Model.Student.EmailAddress</h4>
                <h4>班级：@Model.Student.ClassName</h4>
                <h4>主修科目：@Model.Student.Major</h4>
            </div>
            <div class="card-footer text-center">
                <a asp-controller="home" asp-action="index" class="btn btn-primary">回退</a>
                <a asp-controller="home" asp-action="Edit" asp-route-id="@Model.Student.Id" class="btn btn-primary">编辑</a>
                <a asp-controller="home" asp-action="Delete" asp-route-id="@Model.Student.Id" class="btn btn-danger">删除</a>
            </div>
        </div>
    </div>
</div>


@section Scripts{
    <script src="~/js/customscript.js"></script>
}